How can I convert a nested list to a specific dictionary format in Python

welcome to shbcf.ru